home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1985 August / Ahoy_Magazine_85-08_1985_Double_L.d64 / space gunshot (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  680b  |  23 lines

  1. 1 rem sound effects
  2. 2 rem "space" gunshot
  3. 10 gosub 900:goto 100
  4. 20 poke ad(1),5:poke sr(1),53:poke fl(1),30:poke fh(1),30
  5. 25 poke ad(0),5:poke sr(0),53 :poke fh(0),250
  6. 30 poke vl,15:print "."
  7. 40 poke gt(1),129:for i=0 to 29:next:poke gt(0),17
  8. 50 for i=225 to 25 step -25:poke fh(0),i:for x=0 to 19:next:next
  9. 60 poke gt(1),0:poke gt(0),0
  10. 90 return
  11. 99 rem routine to play sounds when shift is pressed
  12. 100 print "press shift to hear sound";
  13. 110 if peek(653)=0 then 110
  14. 120 gosub 20:goto 100
  15. 898 rem routine to set up variables
  16. 899 rem set up sound control addresses
  17. 900 fl(0)=54272:fh(0)=54273:gt(0)=54276:ad(0)=54277:sr(0)=54278
  18. 905 for i=1 to 2:x=i*7:fl(i)=fl(0)+x:fh(i)=fh(0)+x:gt(i)=gt(0)+x:ad(i)=ad(0)+x
  19. 906 sr(i)=sr(0)+x:next
  20. 909 rem set volume address
  21. 910 vl=54296
  22. 990 return
  23.